﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ecosystème
{
    public partial class frmGestionPlateau : Form
    {
        private bool _Quitter;
        public bool Quitter
        {
            get { return _Quitter; }
            set { _Quitter = value; }
        }
        private bool _Reduire;
        public bool Reduire
        {
            get { return _Reduire; }
            set { _Reduire = value; }
        }
        private bool _Play;
        public bool Play
        {
            get { return _Play; }
            set { _Play = value; }
        }
        public frmGestionPlateau()
        {
            InitializeComponent();
        }

        private void frmGestionPlateau_Load(object sender, EventArgs e)
        {
            Image im = System.Drawing.Image.FromFile(Application.StartupPath + @"\Content\Annuler.png");
            Bitmap img = new Bitmap(im, pbQuitter.Width, pbQuitter.Height);
            pbQuitter.Image = img;
            im = System.Drawing.Image.FromFile(Application.StartupPath + @"\Content\moins.png");
            img = new Bitmap(im, pbReduire.Width, pbReduire.Height);
            pbReduire.Image = img;
            im = System.Drawing.Image.FromFile(Application.StartupPath + @"\Content\play.png");
            img = new Bitmap(im, pbPlayPause.Width, pbPlayPause.Height);
            pbPlayPause.Image = img;
        }

        private void pbQuitter_Click(object sender, EventArgs e)
        {
            _Quitter = true;
        }

        private void pbQuitter_MouseHover(object sender, EventArgs e)
        {
            pbQuitter.BackColor = Color.Beige;
        }

        private void pbQuitter_MouseLeave(object sender, EventArgs e)
        {
            pbQuitter.BackColor = Color.Transparent;
        }

        private void pbReduire_Click(object sender, EventArgs e)
        {
            _Reduire = true;
        }

        private void pbReduire_MouseHover(object sender, EventArgs e)
        {
            pbReduire.BackColor = Color.Beige;
        }

        private void pbReduire_MouseLeave(object sender, EventArgs e)
        {
            pbReduire.BackColor = Color.Transparent;
        }

        private void pbPlayPause_Click(object sender, EventArgs e)
        {
            if (!Play)
            {
                Play = true;
                Image im = System.Drawing.Image.FromFile(Application.StartupPath + @"\Content\pause.png");
                Bitmap img = new Bitmap(im, pbPlayPause.Width, pbPlayPause.Height);
                pbPlayPause.Image = img;
            }
            else
            {
                Play = false;
                Image im = System.Drawing.Image.FromFile(Application.StartupPath + @"\Content\play.png");
                Bitmap img = new Bitmap(im, pbPlayPause.Width, pbPlayPause.Height);
                pbPlayPause.Image = img;
            }
        }

        private void pbPlayPause_MouseHover(object sender, EventArgs e)
        {
            pbPlayPause.BackColor = Color.Beige;
        }

        private void pbPlayPause_MouseLeave(object sender, EventArgs e)
        {
            pbPlayPause.BackColor = Color.Transparent;
        }
    }
}
